@extends('admin.layout')
@section('title','视频列表')
@section('content')
                <div class="app_content_div" id="app_content_div_301Index">
                    <h3>直播/录播列表</h3>
                </div>

                <div>
                    <div style="float:right;">
                        <a type="button" class="btn btn-primary" href="video/create">新增</a>
                    </div>
                </div>
                <table class="table table-striped">
                    <thead>
                    <tr>
                        <th>id</th>
                        <th>标题</th>
                        <th>专家</th>
                        <th>类型</th>
                        <th>直播开始时间</th>
                        <th>直播结束时间</th>
                        <th>操作</th>
                        <th></th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($oVideo as $v)
                        <tr>
                            <th scope="row">{{$v->id}}</th>
                            <td>{{$v->name}}</td>
                            <td>{{$v->expert->name}}</td>
                            @if($v->type==1)
                                <td>直播</td>
                            @endif
                            @if($v->type==0)
                                <td>录播</td>
                            @endif
                            <td>{{$v->start_at}}</td>
                            <td>{{$v->end_at}}</td>

                            <td>
                                <a href="video/{{$v->id}}/edit"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a> &nbsp;&nbsp;&nbsp;
                                <form action="/adm/expert/{{$v->id}}" method="post">
                                    <input type="hidden" name="_method" value="DELETE">
                                    {{csrf_field()}}
                                    <a><button type="submit" class="glyphicon glyphicon-trash" aria-hidden="true"></button></a>
                                </form>
                            </td>
                        </tr>
                    @endforeach
                    </tbody>
                </table>
</body>

</html>
                {{$oVideo->links('admin.page')}}
@endsection
